<template>
  <div class="loading" v-show="loading">
    <img src="/static/image/loading.gif" alt>
  </div>
</template>

<script>
export default {
  data() {
    return {
      loading:false
    };
  },
  created() {
    var that = this;
    this.bus.$on("loading", function(data) {
      that.loading = !!data;
    });
  },
  components: {}
};
</script>

<style lang='less'>
.loading {
  height: 100vh;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.3);
  position: fixed;
  top:0;
  left: 0;
  z-index: 9999999999999999999999999;
  img {
    height: 6rem;
    width: 6rem;
  }
}
</style>
